package cool.qingqing.result;

import java.util.List;

/**
 * @author 高山青
 * @Date 2021/12/26  -   0:53
 */
public class Result {
	private ResultEnum code;
	private List data;
	private String msg;

	public Result() {
	}

	public Result(ResultEnum code, List data, String msg) {
		this.code = code;
		this.data = data;
		this.msg = msg;
	}
	public Result(List data) {
		this.code = ResultEnum.SUCCEED;
		this.data = data;
		this.msg = "操作成功";
	}
	public Result(String msg) {
		this.code = ResultEnum.FAIL;
		this.data = data;
		this.msg = msg;
	}

	public ResultEnum getCode() {
		return code;
	}

	public Result setCode(ResultEnum code) {
		this.code = code;
		return this;
	}

	public List getData() {
		return data;
	}

	public Result setData(List data) {
		this.data = data;
		return this;
	}

	public String getMsg() {
		return msg;
	}

	public Result setMsg(String msg) {
		this.msg = msg;
		return this;
	}
}
